<template>
  <div class="box">
    <div class="content">
      <div class="student">
        <ul class="student-info">
          <li>
            <span class="title">宿舍：</span>
            <span class="text">清华苑A栋</span>
          </li>
          <li>
            <span class="title">房间名：</span>
            <span class="text">201</span>
          </li>
          <li>
            <span class="title">检查人：</span>
            <span class="text">李多多</span>
          </li>
          <li>
            <span class="title">检查人电话：</span>
            <span class="text">13154651856</span>
          </li>
          <li>
            <span class="title">得/扣分：</span>
            <span :class="['text', 'red']">-4</span>
          </li>
          <li>
            <span class="title">评分等级：</span>
            <span class="text">丙</span>
          </li>
          <li>
            <span class="title">检查类型：</span>
            <span class="text">内务检查</span>
          </li>
          <li>
            <span class="title">检查时间：</span>
            <span class="text">2021-12-31 13:30</span>
          </li>
          <li>
            <span class="title">打分时间：</span>
            <span class="text">2021-12-31 13:30:30</span>
          </li>
        </ul>
      </div>

      <div v-if="tableData.examineType === 3" class="deduct-points">
        <div class="no-found">本次打分为快速打分，无打分明细，详情请联系检查人员。</div>
      </div>
      <div v-else>
        <!-- 公共项目扣分 -->
        <div class="deduct-points">
          <div class="small-title">公共项目打分</div>
          <div class="deduct-points-content">
            <div class="content-details">
              <ul class="porject">
                <li v-for="item in 9" :key="item">
                  <span class="points">未叠被子：</span>
                  <span class="deduct">-1</span>
                </li>
              </ul>
            </div>
            <div class="content-img-box">
              <div v-for="item in 4" :key="item" class="content-img">
                <img
                  src="https://img1.baidu.com/it/u=2716398045,2043787292&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800"
                  alt=""
                />
              </div>
            </div>
          </div>
        </div>
        <!-- 个人项目打分 -->
        <div class="deduct-points">
          <div class="small-title">个人项目打分</div>
          <div class="deduct-points-content">
            <div class="content-details">
              <ul class="personal-porject">
                <li v-for="item in 3" :key="item" class="personal-info">
                  <div style="margin: 0 40px 0 0">
                    <span style="margin: 0 16px 0 0">张三</span>
                    <span style="margin: 0 16px 0 0">2号床</span>
                    <span>高一二班</span>
                  </div>
                  <div>
                    <span class="personal-info-content">床铺未叠、个人用品乱摆放：</span>
                    <span>-2</span>
                  </div>
                </li>
              </ul>
            </div>
            <div class="content-img-box">
              <div v-for="item in 4" :key="item" class="content-img">
                <img
                  src="https://img1.baidu.com/it/u=2716398045,2043787292&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800"
                  alt=""
                />
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- 备注 -->
      <div class="deduct-points">
        <div class="small-title">备注</div>
        <div class="mark">
          <a-textarea v-model:value="mark" readonly show-count :maxlength="100" />
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue';

const mark = ref(null);
</script>

<style lang="less" scoped>
.box {
  background: #f2f2f2;
  // padding: 50px 120px 24px;
  min-height: 100vh;
  .content {
    background: #ffffff;
    border-radius: 4px;
    padding: 24px;
    .student {
      border: 1px solid #e4b778;
      border-radius: 4px;
      padding: 24px;
      width: 100%;
      margin-bottom: 24px;
      .student-info {
        display: flex;
        flex-wrap: wrap;
        margin-bottom: 0;
        li {
          width: 20%;
          padding: 12px 0;
          font-size: 14px;
          .title {
            color: #999999;
            display: inline-block;
            width: 40%;
            text-align: end;
          }
          .text {
            color: #222222;
          }
          .red {
            color: #ff0000;
          }
        }
      }
    }
    .deduct-points {
      margin-bottom: 32px;
      &-content {
        padding: 14px 16px;
        background: #f8f8f8;
        border-radius: 4px;
        margin-top: 20px;
        display: flex;
        align-items: center;
      }
      .content-details {
        width: 40%;
        .porject {
          display: flex;
          align-items: center;
          flex-wrap: wrap;
          margin-bottom: 0;
          line-height: 32px;
          li {
            width: 30%;
            font-size: 14px;
            .points {
              color: #999999;
            }
            .deduct {
              color: #222222;
            }
          }
        }
        .personal-porject {
          .personal-info {
            display: flex;
            align-items: center;
            font-size: 14px;
            font-family: Source Han Sans CN, Source Han Sans CN-Regular;
            color: #222222;
            .personal-info-content {
              color: #999999;
            }
          }
          .personal-info + .personal-info {
            margin-top: 16px;
          }
          .personal-info::before {
            content: '';
            display: inline-block;
            width: 8px;
            height: 8px;
            background: #bb964b;
            border-radius: 50%;
            margin-right: 8px;
          }
        }
      }
      .content-img-box {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        .content-img {
          width: 86px;
          height: 86px;
          border-radius: 4px;
          background: #f2f2f2;
          margin: 12px;
          overflow: hidden;
          img {
            width: 100%;
            height: 100%;
          }
        }
      }
      .mark,
      .no-found {
        padding: 14px 16px;
        background: #f8f8f8;
        border-radius: 4px;
        margin-top: 20px;
      }
      .no-found {
        text-align: center;
        padding: 32px;
        font-size: 16px;
        font-family: Source Han Sans CN, Source Han Sans CN-Regular;
        color: #666666;
      }
    }
  }
}
.small-title {
  font-size: 18px;
  font-family: Source Han Sans CN, Source Han Sans CN-Medium;
  font-weight: 500;
  color: #222222;
}
/deep/textarea.micro-dormitory-input {
  border: 0;
  background: transparent;
  resize: none;
}
/deep/.micro-dormitory-input:focus {
  box-shadow: none;
}
</style>
